<?php

namespace App\Controller;

use App\Model\Article;
use Kinfy\View\View;


class ArticleController
{
    public function index()
    {
        echo 'article index';
    }
    public function getTop($num = 10)
    {

        //echo "取得前{$num}条文章";

        //模型可以想象成是数据库里的表映射的类
        $Art = new Article();

        $artlist = $Art->getTop($num);

        View::show('articlelist', $artlist);


    }


}

